home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
oper_sys
/
emerald
/
emrldsys.lha
/
Language
/
Compiler
/
assert.h
< prev
next >
Wrap
C/C++ Source or Header
|
1990-08-16
|
659b
|
28 lines
/*
* @(#)assert.h 1.2 3/18/87
*/
/* assert.h 4.1 83/05/03 */
#ifndef assert_h
#define assert_h
#ifndef FILE
#include <stdio.h>
#endif
# ifdef lint
# define assert(ex) {int assert__x_; assert__x_ = (ex); assert__x_ = assert__x_;}
# define _assert(ex) {int assert__x_; assert__x_ = (ex); assert__x_ = assert__x_;}
# else
# ifndef NDEBUG
extern char assertMessage[];
# define _assert(ex) {if (!(ex)){fprintf(stderr,\
assertMessage, __FILE__, __LINE__); abort();}}
# define assert(ex) {if (!(ex)){fprintf(stderr,\
assertMessage, __FILE__, __LINE__);abort();}}
# else
# define _assert(ex) ;
# define assert(ex) ;
# endif
# endif
#endif